Release 10.1A: OpenEdge Development:
Progress 4GL Reference


AND operator

Returns a TRUE value if each logical expression is TRUE.

Syntax

expression AND expression 

expression

An expression that evaluates to a logical value (TRUE or FALSE).

Example

This procedure lists all customers with credit limits between two values (supplied by the user and stored in the variables low-credit and hi-credit). The expressions credit-limit >= low-credit and credit-limit <= hi-credit are logical expressions because each yields a true or false value. Using the AND operator to join these logical expressions results in a logical expression that follows the WHERE keyword.

r-and.p
DEFINE VARIABLE low-credit LIKE credit-limit LABEL "Low Credit Limit".
DEFINE VARIABLE hi-credit LIKE credit-limit LABEL "High Credit Limit".

REPEAT:
  SET low-credit hi-credit WITH FRAME cr-range.
  FOR EACH customer WHERE
    (credit-limit >= low-credit) AND (credit-limit <= hi-credit):
      DISPLAY cust-num name credit-limit.
  END.
END. 

See also

NOT operator, OR operator


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095